﻿// validations interface
Validations = {
	currency: function(field, e) {
		var mask = /\d|\./;
		var digit = String.fromCharCode(e.charCode);

		if (digit == '.' && (/\./).exec(field.value) != null)
			return false;

		return (mask.exec(digit) != null);
	}
};

$(document).ready(function() {

	if (!Payroller.capable()) {
		alert('Unable to use PayRoller.\nNo localStorage.');
		return;
	}

	// init the payroller state
	Payroller.init();
});